<template>
	<view class="topic-nav">
		<view class="top d-flex jc-between ai-center">
			<view class="major">热门分类</view>
			<view class="d-flex jc-between ai-center" @tap="openMore">
				更多<view class="iconfont icon-jinru"></view>
			</view>
		</view>
		<view class="bottom d-flex jc-between ai-center">
			<block v-for="item in nav" :key="item.id">
				<view class="">{{item.name}}</view>
			</block>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			nav: {
				type: Array
			}
		},
		methods:{
			openMore(){
				this.$Router.push({name: 'topic_classify'})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.topic-nav {
		border-bottom: 1upx solid #EEEEEE;
		border-top: 1upx solid #EEEEEE;
		padding: 20upx;

		.top {
			margin-bottom: 10upx;

			view {
				color: #9e9e9e;
			}

			.major {
				color: #333333;
				font-size: 34upx;
			}
		}

		.bottom {
			padding: 0 16upx;

			view {
				color: #a7a7a7;
				padding: 0 16upx;
				background-color: #f1f1f1;
				border-radius: 6upx;
				text-align: center;
			}
		}
	}
</style>
